package cn.service;

import cn.dao.UserDao;
import cn.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by wsx on 2017/1/5.
 */
@Service
public class UserService {
    @Autowired
    private UserDao userDao;

    public String login(String uemail,String upasswd)
    {
        if(1 == userDao.login(uemail,upasswd))
            return "true";
        else
            return "false";
    }

    public String register(User user)
    {
        if(1 == userDao.register(user))
            return "true";
        else
            return "false";
    }

}
